import http from '@/utils/http'
/**
 * @description 文件上传
 * @param params
 */
export function fileUpload(params: any) {
  return http.post<any>(`/admin/minio/upload`, {
    params,
    headers: {
      'Content-Type': 'multipart/form-data',
    },
  })
}

/**
 * @description 文件下载
 * @param params
 */
export function fileDownLoad(params: any) {
  return http.get<any>(`/admin/minio/download?fileName=${params.fileName}`, {
    responseType: 'blob', // 确保接收的是二进制数据
  })
}
